#ifndef POLYGON_INCLUDED
#define POLYGON_INCLUDED

#pragma once

#include <vector>
#include "vec2.h"
#include "Renderer.h"

namespace ftb
{
	class Polygon
	{
	public:
		Polygon(const std::vector<vec2f>& points, const std::string& texturepath);
		Polygon(const vec2f& a, const vec2f& b, const vec2f& c);
		void Add(const vec2f& v);
		void Split(unsigned int index); // splits the line between the vectors list[index] and list[index + 1]
		void Render(Renderer& renderObj);  // renders the polygon using a renderer
	private:
		std::string m_TexturePath;
		std::vector<vec2f> m_Points;
	};
}

#endif